﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using PloobsEngine.Commands;
using PloobsEngine.Cameras;

namespace PloobsEngine.Features
{
    public class SkyDomeParametersCommand : ICommand
    {
        
        private ICamera cam = null;        
        private String texName = null;
        private SkyDome sb;
        private String texName2 =null;
        private float Speed;
        private float diffSpeed;

        public SkyDomeParametersCommand(ICamera cam, String tex0, String tex1, float speed, float diffSpeed)
        {
            this.diffSpeed = diffSpeed;
            this.Speed = speed;
            this.texName2 = tex1;
            this.texName = tex0;
            this.cam = cam;         
        }

        public SkyDomeParametersCommand(ICamera cam, String tex)
        {
            this.texName = this.texName2 = tex;
            this.diffSpeed = 1;
            this.Speed = 1f;
            this.cam = cam;
        }

        public SkyDomeParametersCommand(ICamera cam, String tex, float speed)
        {
            this.texName = this.texName2 = tex;
            this.diffSpeed = 1;
            this.Speed = speed;
            this.cam = cam;
        }


        #region ICommand Members

        public void execute()
        {   
                //sb.setParameters(cam, texName);
                sb.setParameters(cam, texName,texName2,Speed,diffSpeed);            
        }

        public void setTarget(object obj)
        {
            this.sb = obj as SkyDome;            
        }

        #endregion

        #region ICommand Members


        public string TargetName
        {
            get { return SkyDome.MyName; }
        }

        #endregion
    }
    
}
